package com.gitee.wsl.mathematics.function.noise.d3

import com.gitee.wsl.mathematics.function.noise.Noise3d
import com.gitee.wsl.mathematics.vector.vec3.Vec3f

class ScaledNoise3d(val noise: Noise3d, val amplitude: Float = 1f, val scale: Float = 1f, val center: Vec3f = Vec3f.ZERO) :
    Noise3d {
    override fun eval(x: Float, y: Float, z: Float): Float {
        return noise.eval(center.x + x * scale, center.y + y * scale, center.z + z * scale) * amplitude
    }
}